﻿@{ Layout = "~/Views/Shared/_leftPanelLayout.cshtml";}
@section LeftTree
{
     
    @{
        Html.RenderPartial("DeptTreePartialView", new Webcar.Models.DeptTreeMode { Action = "GpsList", Controller = "Table", ShowChild = false });
     }
}
<style type="text/css">
    .C2
    {
        text-align:right;
        width:60px;
        vertical-align:top;
    }
     .C1
    {
        text-align :left;
        vertical-align:top;
    }
     .C0
    {
        vertical-align:top;
        padding:5px 0px 5px 0px;
    }
</style>
@using (Ajax.BeginForm("GpsListPartialView", "Table", Html.ViewContext.RouteData.Values, new AjaxOptions
    {
        HttpMethod = "POST",
        UpdateTargetId = "list-car",
        InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace
    }))
    { 
        @UserQuery.CreateQuery(setting => {
       setting.QueryKey = QuerySettings.GpsList;
       setting.Columns.Add(new QueryColumn() { Field = "dept_name", Name = "单位" });
           setting.Columns.Add(new QueryColumn() { Field = "ny", Name = "上报月份" });
           setting.Columns.Add(new QueryColumn() { Field = "total_gps", Name = "GPS总数" });
    })
}
<div id="list-car">
    @Html.Action("GpsListPartialView")
</div>
<hr />

<table>
    <tr>
        <td>
 @Html.DevExpress().Button(settings =>
{
    settings.Name = "Button1";
    settings.Text = "增加GPS统计";
    settings.Width = 120;
    settings.ControlStyle.CssClass = "button1";
    settings.ClientSideEvents.Click = "function(s, e){ location.href='" + @Url.Action("GpsEdit", "Table") + "' }";
}).GetHtml()

        </td>
<td>
 @Html.DevExpress().Button(settings =>
{
    settings.Name = "Button2";
    settings.Text = "导出EXCEL";
    settings.Width = 120;
    settings.ControlStyle.CssClass = "button1";
    settings.ClientSideEvents.Click = "function(s, e){ location.href='" + @Url.Action("GpsListExport", "Table", Html.ViewContext.RouteData.Values) + "' }";
}).GetHtml()


</td>

    </tr>
</table>



